/*
 * @Author: Yang Zhang
 * @Date: 2021-11-18 22:27:46
 * @LastEditors: Yang Zhang
 * @LastEditTime: 2021-12-10 00:52:01
 * @Description: 
 */
import { RouteRecordRaw } from 'vue-router'
import indexLayout from '@/layout/index.vue'
const routes: RouteRecordRaw[] = [
  {
    path: '/',
    name: 'default',
    redirect: '/kol'
  },
  {
    path: '/login',
    name: 'kol-login',
    component: () => import('@/views/Login/index.vue'),
    meta: {
      title: '登录'
    }
  },
  {
    path: '/kol',
    name: 'kol',
    redirect: '/kol/index',
    component: () => import('@/layout/index.vue'),
    children: [
      {
        path: '/kol/index',
        name: 'index',
        component: () => import('@/views/Index/index.vue')
      },
      {
        path: '/kol/index/storeProfile',
        name: 'storeProfile',
        component: () => import('@/views/Index/storeprofile/index.vue')
      },
      {
        path: '/kol/index/editStore',
        name: 'editStore',
        component: () => import('@/views/Index/edit/index.vue')
      }
    ]
  },
  {
    path: '/wallet',
    name: 'wallet',
    component: () => import('@/layout/index.vue'),
    redirect: '/wallet/index',
    children: [
      {
        path: '/wallet/index',
        name: 'walletindex',
        component: () => import('@/views/Wallet/index.vue'),
        redirect: '/wallet/income',
        children: [
          {
            path: '/wallet/income',
            name: 'income',
            component: () => import('@/views/Wallet/Income/index.vue')
          },
          {
            path: '/wallet/orders',
            name: 'orders',
            component: () => import('@/views/Wallet/Orders/index.vue')
          },
          {
            path: '/wallet/withdraw',
            name: 'withdraw',
            component: () => import('@/views/Wallet/Withdraw/index.vue')
          }
        ]
      }
    ]
  },
  {
    path: '/product',
    name: 'product',
    component: () => import('@/layout/index.vue'),
    redirect: '/product/index',
    children: [
      {
        path: '/product/index',
        name: 'proindex',
        component: () => import('@/views/Product/index.vue')
      },
      {
        path: '/product/detail',
        name: 'prodctdetail',
        component: () => import('@/views/Product/detail/index.vue')
      }
    ]
  },
  {
    path: '/my',
    name: 'my',
    component: () => import('@/layout/index.vue'),
    redirect: '/my/account',
    children: [
      {
        path: '/my/account',
        name: 'account',
        component: () => import('@/views/News/Accout/index.vue')
      },
      {
        path: '/my/msg',
        name: 'msg',
        component: () => import('@/views/News/Msg/index.vue')
      }
    ]
  },
  {
    path: '/orders',
    name: 'ordersitem',
    component: () => import('@/layout/index.vue'),
    redirect: '/orders/detail',
    children: [
      {
        path: '/orders/detail',
        name: 'detailorder',
        component: () => import('@/views/Wallet/Orders/detail/index.vue')
      }
    ]
  },
  // {
  //   path: '/403',
  //   name: '403',
  //   meta: {
  //     title: '403'
  //   },
  //   component: AIPointLayout,
  //   children: [
  //     {
  //       path: '',
  //       name: '403',
  //       component: () => import('@/views/403/index.vue'),
  //       meta: {
  //         title: '403'
  //       }
  //     }
  //   ]
  // },
  {
    path: '/404',
    name: '404',
    meta: {
      title: '404'
    },
    component: () => import('@/views/404/index.vue')
  },
  {
    path: '/:catchAll(.*)',
    name: '404',
    meta: {
      title: '404'
    },
    component: () => import('@/views/404/index.vue')
  }
]

export default routes
